#!/usr/bin/env python3


class schoolMember(object):
    def __init__(self, name, sex, age, addr):
        self.name = name
        self.sex = sex
        self.age = age
        self.addr = addr

    def __str__(self):
        return self.__class__.__name__ + str(self.__dict__)


class teacher(schoolMember):
    def __init__(self, name, sex, age, addr, kecheng, salary):
        schoolMember.__init__(self, name, sex, age, addr)
        self.kecheng = kecheng
        self.salary = salary


class student(schoolMember):
    def add_message(self, chengji, banji):
        self.chengji = chengji
        self.banji = banji


t = teacher('a', 'm', 2, 'abc', 'python', 10000)
s = student('b', 'f', 3, 'ert')
s.add_message('python', '1')

print(t)
print(s)
